Conversation
There was a problem hiding this comment.
Sorry @mrrajan, your pull request is larger than the review limit of 150000 diff characters
c421da9 to
6df59ac
Compare
There was a problem hiding this comment.
Sorry @mrrajan, your pull request is larger than the review limit of 150000 diff characters
e1db78b to
367fe8c
Compare
a22d44a to
b40bc64
Compare
9543f1c to
9ae6132
Compare
…late - Create performance-setup skill with route/module discovery - Create generic performance-config.template.md with placeholders - Skill discovers routes from router configuration files - Skill discovers modules from lazy-loaded routes and build config - Template provides guidance for scenarios and module registry - Implements idempotent setup with update/skip options Implements TC-4130 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Assisted-by: Claude Code
…e capture script - Create 6 performance workflow templates (baseline, module analysis, optimization task/plan, verification) - Implement Playwright-based capture-baseline.template.mjs with comprehensive security hardening - Security fixes: path traversal prevention, prototype pollution mitigation, token leakage prevention - Localhost validation (127.0.0.0/8, ::1, blocks 0.0.0.0 and IPv6-mapped) - Port validation (1-65535), iteration bounds (max 50/10), URL path validation - Correct LCP metric using largest-contentful-paint entries - Robust config table parsing (only actual table rows) - Prerequisites documentation and user consent requirements Implements TC-4131 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add performance-workflow-discovery skill that analyzes frontend source code to identify functional workflows (user journeys), presents discovered workflows to the user, and prompts for selection. This skill serves as the entry point for the workflow- based performance optimization approach. - Discovers workflows from router configuration, feature modules, and navigation structure - Estimates complexity based on components and API calls - Saves user selection to performance-config.md - Updated docs/workflow.md with performance optimization workflow section Implements TC-4132 Assisted-by: Claude Code
…tion Add performance-baseline skill that captures performance metrics for user-selected workflows with test data verification before measurement. Key features: - Verifies Performance Analysis Configuration and selected workflow exist - Prompts user to confirm test data availability before capture - Handles existing baselines with replace/cancel prompt - Copies capture script template from plugin cache - Executes browser automation to measure LCP, FCP, TTI, Total Load Time - Filters scenarios to include only selected workflow's key screens - Generates baseline report with metrics, resource timing, waterfall - Comprehensive error handling for common failures (app not running, Playwright not installed, invalid URLs, missing performance marks) - Updated docs/workflow.md with baseline capture skill documentation Implements TC-4133 Assisted-by: Claude Code
…detection Add performance-analyze-module skill that performs deep performance analysis of user-selected workflows by examining bundle composition and detecting nine common performance anti-patterns: over-fetching, N+1 queries, waterfall loading, render-blocking resources, unused code, expensive re-renders, long tasks, layout thrashing, and missing lazy loading. The skill generates comprehensive analysis reports with severity classification, quantified impact estimates, and prioritized optimization recommendations scoped to the selected workflow. Jira-Issue-Id: TC-4134 Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
…k generation Add performance-plan-optimization skill that generates structured optimization plans from module-level analysis reports, creating Jira Epic and Tasks for optimization work. The skill reads workflow-analysis-report.md, groups optimizations into logical tasks (bundle size, API, render, resource, long task categories), generates optimization-plan.md with executive summary and task sequence, creates Jira Epic with performance-optimization label, and creates linked Tasks with performance-specific sections (Baseline Metrics, Target Metrics, Performance Test Requirements). Jira-Issue-Id: TC-4135 Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
…e test handling Add performance-implement-optimization skill that executes performance optimization tasks by implementing code changes, running functional and performance tests, and comparing results against targets. The skill extends implement-task workflow with performance-specific steps: parses performance sections (Baseline Metrics, Target Metrics, Performance Test Requirements), implements optimizations, runs functional tests with flexible handling (tries npm test, prompts for custom test command, or recommends manual verification), captures performance metrics, generates before/after comparison report, and updates Jira with results. Key feature: Step 8 tries npm test first, then prompts user whether tests exist and requests test script path/instructions if available, or recommends manual regression verification if no tests exist. Jira-Issue-Id: TC-4136 Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements the performance-verify-optimization skill that verifies performance optimization PRs by: - Reading review feedback and creating sub-tasks for change requests - Validating acceptance criteria from Jira task - Optionally re-running performance baseline as redundant check - Validating target achievement (Full Success, Partial Success, Regression) - Generating verification report with Overall result (PASS/WARN/FAIL) - Posting report to GitHub PR and Jira task Extends verify-pr workflow with performance-specific verification steps. Baseline re-run is optional — used as redundant validation since regression detection happens in performance-implement-optimization phase. Jira-Issue-Id: TC-4137 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…workflow Updates existing documentation files to integrate performance optimization skills into the sdlc-workflow plugin documentation: - README.md: Add all 6 performance skills to Available Plugins list - docs/tools.md: Add Playwright section with installation, requirements, and graceful degradation notes - docs/project-config-contract.md: Document optional Performance Analysis Configuration section with schema and example - plugins/sdlc-workflow/shared/jira-access-strategy.md: Add Performance Optimization JIRA Workflow section documenting Epic/Task hierarchy, label conventions, and task description extensions - docs/templates/conventions.md: Add Performance Optimization section template for per-repository conventions All changes maintain consistency with existing documentation style and structure. Jira-Issue-Id: TC-4138 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add performance-workflow-guide.md (end-to-end workflow) - Add performance-skills-reference.md (skill catalog) - Add performance-metrics-guide.md (metrics and thresholds) - Clarify analyze-module inspects source code - Clarify plan-optimization reads reports (does NOT inspect code) Quick reference style: tables, bullet points, minimal prose. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add Performance Optimization section to project CONVENTIONS.md - Document quick reference style (tables, bullets, minimal prose) - Document perf commit type for performance features - Clarify skill distinctions (source code analysis vs report reading) - Document metrics conventions (p95, Core Web Vitals, regression threshold) - Document baseline capture and anti-pattern detection standards - Update setup skill's conventions.template.md with Performance Optimization section - Users running /setup will now get performance conventions in their CONVENTIONS.md Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
BREAKING CHANGE: performance-workflow-discovery merged into performance-setup - Unified workflow selection during setup (eliminates separate discovery step) - Three-layer optimization model: frontend/backend/integration anti-pattern detection - Backend analysis for N+1 queries, missing pagination, inefficient queries across Rust/Java/Python/Node frameworks - Frontend/backend/full-stack baseline capture modes with security hardening - Critical fixes: port extraction, Jira Epic-Task parent field, auto-stash on regression, concurrent edit protection Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Dev command auto-discovery with frontend/backend/full-stack conditional discovery - Config path auto-detection (walks up 5 parent dirs) - Serena MCP detection and onboarding prompts with Serena-first fallback strategy - UX improvements: explicit Approve/Modify/Exit menus, display all workflows including standalone routes Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…n detection, and missing index detection Add three new analysis steps to performance-analyze-module: recursive call graph tracing (Step 7.6.2), wasted computation detection (Step 7.6.3), and missing database index detection (Step 7.6.4). Extract reusable call chain logic into Pattern 12 in common-patterns.md. Add analysis config parameters (chain_depth, db_latency_ms) and report template sections. Replace OHA references with curl/bc throughout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…etection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace performance-config.md with performance-config.json across all skills and docs. Replace inline grep/awk config parsing with perf-config.py get/set calls, inline benchmarking with perf-benchmark.sh, and lockfile-based write protection with atomic writes. Add Pattern 13 (Discovery Result Integrity), Playwright verification step, dual-gate drift thresholds, and low-confidence findings section. Delete performance-config.template.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ls, and broken flows Fix backend-only mode by moving Serena probe out of frontend scope skip path, replace phantom tool references (ToolSearch, Glob, search_for_pattern), unify serena sentinel contract on null, fix config field name mismatches, remove deprecated metadata.dev_command_approved dual-write, standardize template placeholders to single-brace, merge duplicate plan templates, add backend metric support to all templates, correct stale step references and Jira parameter conventions, and add reconciliation notes for overlapping detection steps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: mrrajan <86094767+mrrajan@users.noreply.github.com.>
…, and config path normalization - Add db-migration as performance task specialization in implement-task and verify-pr - Move config path from .claude/performance-config.json to performance-config.json - Add frontend-to-backend API tracing for full-stack baseline scoping - Expand analysis artifacts (findings-validation.json, query-ledger.json, analysis-progress.json) - Add eval spec for performance optimization skills Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d add N+1/pre-fetch detection - Remove Step 9 skip for performance tasks — CI checks, scope containment, and all self-verification sub-steps now run before metric verification - Add root cause elimination check to catch incomplete optimizations (e.g., batch helpers added inside a loop without eliminating the loop) - Add N+1 loop origin identification in analyze-module findings - Add concurrent per-item query detection (Step 7.3.1) for pre-fetch opportunities - Add loop elimination mandate and pre-fetch mandate in plan-optimization - Add query safety constraints from CONVENTIONS.md for parameter-limit-safe SQL - Add strategic materialization promotion for denormalized table findings - Add performance task evals for implement-task and verify-pr Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add detection steps for Cross-Table OR, Load-All-Then-Search, Unbounded Iteration, Late Pagination, Redundant Indexes, and Recursive CTE Risk. Add query restructuring mandate for plan-optimization. Include mock backend fixtures for true-positive and false-positive eval coverage. Ignore eval outputs/ in .gitignore. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduce Steps 7.8.1–7.8.4 for detecting anti-patterns in migration DML (missing ANALYZE, non-materialized CTEs, uniform processing, expensive PL/pgSQL patterns). Add Step 5.6 for optimization handling of existing migrations, report/template sections, and eval case 9 with mock-backend-migration fixtures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9ae6132 to
cf9f4c7
Compare
Consolidate four duplicate scope_context blocks (Steps 7.8.1-7.8.4) into one preamble rule, resolving the skillsaw context-budget CI error. Implements TC-4129 Assisted-by: Claude Code
There was a problem hiding this comment.
Eval Results
implement-task
No results produced. See workflow logs.
Eval Results: performance-analyze-module
| Eval | Passed | Failed | Pass Rate |
|---|---|---|---|
| eval-1 | 8/8 | 0 | 100% |
| eval-2 | 7/7 | 0 | 100% |
| eval-3 | 6/6 | 0 | 100% |
| eval-4 | 5/5 | 0 | 100% |
| eval-5 | 6/6 | 0 | 100% |
| eval-6 | 5/5 | 0 | 100% |
| eval-7 | 8/8 | 0 | 100% |
| eval-8 | 5/5 | 0 | 100% |
| eval-9 | 7/7 | 0 | 100% |
Pass rate: 100% · Tokens: 72,103 · Duration: 303s
Generated by sdlc-workflow/run-evals v0.13.9
Eval Results: performance-baseline
Per-Eval Results
| Eval | Description | Pass Rate | Passed | Failed | Total | Tokens | Duration |
|---|---|---|---|---|---|---|---|
| 1 | Frontend workflow discovery (Settings) | 100% | 7 | 0 | 7 | 48,329 | 162.1s |
| 2 | Full-stack API tracing (Package Mgmt) | 100% | 7 | 0 | 7 | 62,503 | 264.9s |
| 3 | Missing config halt | 100% | 4 | 0 | 4 | 31,328 | 53.3s |
| 4 | Backend-only discovery (Package API) | 100% | 7 | 0 | 7 | 51,354 | 177.0s |
| 5 | Skip backend downgrade to frontend-only | 100% | 6 | 0 | 6 | 53,655 | 204.4s |
| 6 | Incomplete workflow halt | 100% | 4 | 0 | 4 | 33,863 | 72.7s |
Aggregate Stats
| Metric | Mean | Stddev |
|---|---|---|
| Pass Rate | 100.0% | 0.0% |
| Tokens | 46,839 | 10,980 |
| Duration | 155.7s | 73.2s |
Total assertions: 35 | Passed: 35 | Failed: 0
Baseline Comparison
No baseline available — this is the first run for the performance-baseline skill.
sdlc-workflow v0.13.9 — Generated by run-evals
Eval Results: performance-plan-optimization
| Eval | Passed | Failed | Pass Rate |
|---|---|---|---|
| eval-1 | 13/13 | 0 | 100% |
| eval-2 | 5/5 | 0 | 100% |
| eval-3 | 5/5 | 0 | 100% |
| eval-4 | 10/10 | 0 | 100% |
Pass rate: 100% · Tokens: 67,227 · Duration: 363s
Generated by sdlc-workflow/run-evals v0.13.9
performance-setup
No results produced. See workflow logs.
Eval Results: verify-pr
| Eval | Passed | Failed | Pass Rate |
|---|---|---|---|
| eval-1 | 12/12 | 0 | 100% |
| eval-2 | 11/11 | 0 | 100% |
| eval-3 | 15/15 | 0 | 100% |
| eval-4 | 10/10 | 0 | 100% |
| eval-5 | 10/10 | 0 | 100% |
| eval-6 | 10/10 | 0 | 100% |
| eval-7 | 8/8 | 0 | 100% |
Pass rate: 100% · Tokens: 81,989 · Duration: 597s
Baseline (latest): 98% · 63,117 tokens · 245s
Generated by sdlc-workflow/run-evals v0.13.9
Eval Results: setup
| Eval | Passed | Failed | Pass Rate |
|---|---|---|---|
| eval-1 | 9/9 | 0 | 100% |
| eval-2 | 8/8 | 0 | 100% |
| eval-3 | 8/8 | 0 | 100% |
| eval-4 | 7/7 | 0 | 100% |
| eval-5 | 8/8 | 0 | 100% |
| eval-6 | 7/7 | 0 | 100% |
Pass rate: 100% · Tokens: 34,200 · Duration: 141s
Generated by sdlc-workflow/run-evals v0.13.9
Summary
This PR adds a comprehensive Performance Optimization Workflow to the sdlc-workflow plugin, enabling teams to systematically analyze, optimize, and verify application performance as part of their SDLC.
What's Included
7 New Skills
Backend Source Code Analysis
Workflow-First Architecture
performance-workflow-discoverymerged intoperformance-setupAuto-Discovery & UX Enhancements
Documentation
Context Changes from Original Plan
Original PRs (#73, #74, #75) were closed due to iterative development leading to:
This PR consolidates 9 iterative commits into 2 logical commits for cleaner history.
Related Issue
Closes TC-4129
🤖 Generated with Claude Code